//
//  FlashNavView.m
//  Fireball
//
//  Created by 俞渊华 on 2017/12/21.
//  Copyright © 2017年 俞渊华. All rights reserved.
//

#import "FlashNavView.h"

#import "XLSlideSwitch.h"

@interface FlashNavView ()
@property(nonatomic, strong)XLSlideSwitch *slideSwitch;

@end

@implementation FlashNavView

-(instancetype)initWithFrame:(CGRect)frame{
    if ([super initWithFrame:frame]) {
        self.backgroundColor = XMRandomColor;
        
        //创建滚动视图
        
//        CGRect rect = CGRectMake(0, 0, self.width, SCREEN_HEIGHT -kNav_Height - kTabBarHeight);
//        self.slideSwitch = [[XLSlideSwitch alloc] initWithFrame:rect Titles:self.showMenua viewControllers:self.viewControllers];
        //设置代理
        self.slideSwitch.delegate = self;
        //设置按钮选中和未选中状态的标题颜色
        self.slideSwitch.itemSelectedColor = [UIColor xm_colorFromRGB:0x212832];
        self.slideSwitch.itemNormalColor = [UIColor xm_colorFromRGB:0x858C96];
        //显示方法
        [self.slideSwitch showInViewController:self.viewController];
    }
    return self;
}

-(void)layoutSubviews{
    [super layoutSubviews];
}
-(void)drawRect:(CGRect)rect{
    [super drawRect:rect];
}


@end
